import request from '@/utils/request'

// 获取角色列表
export const getRoleList = params => request({
  url: '/sys/role',
  params
})

// 新增角色
export const addRole = data => request({
  url: '/sys/role',
  method: 'post',
  data
})

// 获取角色详细
export const getRole = id => request({
  url: `/sys/role/${id}`
})

// 获取修改角色信息
export const updateRole = (id, data) => request({
  method: 'PUT',
  url: `/sys/role/${id}`,
  data
})

// 删除角色

export const delRole = id => request({
  url: `/sys/role/${id}`,
  method: 'delete'
})
